//
//  MessageModel.m
//  ChatDemo
//
//  Copyright (c) 2013 北京千锋互联科技有限公司. All rights reserved.
//

#import "MessageModel.h"
#import "NSData+Base64.h"
@implementation MessageModel

- (UIImage *)image {
    // msg 转化成nsdata-->uiimage
    if (self.msg.length < 1000) return nil;
    NSData *d = [NSData dataFromBase64String:self.msg];
    if (d == nil) return nil;
    UIImage *img = [[UIImage alloc] initWithData:d];
    return img;
}

@end
